<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" ng-app="routerApp">
<head>
	<meta charset="utf-8" />
<meta http-equiv="Content-Type" content="text/html" />
		<title>登录</title>
		<link href="../../css/login.css" rel="stylesheet" type="text/css">
        <link rel="stylesheet" href="../../css/index.css">
        <link rel="stylesheet" href="../../css/toast.min.css">
        <link rel="icon" type="image/png" sizes="16x16" href="../../imgs/favicon.ico">
        <script  type="text/javascript"  src="../../bowerjs/bowerjs.js"></script>
        <script type="text/javascript"  src="../../js/app.js" ></script>
        <script type="text/javascript"  src="../../js/controller.js" ></script>
        <script type="text/javascript"  src="../../js/directive.js" ></script>
        <script type="text/javascript"  src="../../js/angular-animate.min.js"></script>
        <script type="text/javascript"  src="../../js/toaster.min.js"></script>
        <script type="text/javascript"  src="../../js/md5.js" ></script>
</head>

<body class="login" >

<div class="login_m"  ng-controller="loginController">
	<div class="login_logo">
		<img src="../../imgs/favicon.png" style="margin-left: -15px;">
	</div>
	<div class="login_boder">
		<div class="login_padding">
			<h2>用户名</h2>
			<label>
				<input type="text" id="username" ng-model="$parent.username" class="txt_input txt_input2" value="" placeholder="请输入用户名">
			</label>
			<h2>密码</h2>
			<label>
				<input type="password" name="password" ng-model="$parent.password" id="userpwd" class="txt_input"  value="" placeholder="请输入密码">
			</label>
			<h2>验证码:</h2>
			<label style="height: 60px;float: left;">
        		<input type="text" id="code" name="code" class="txt_input"  style="width:100px;float: left;" placeholder="验证码"/>
        		<img id="imgObj" alt="验证码" src="/api/admin/validateCode" onclick="changeImg()" style="float: left;margin-left: 15px;"/>
        		<a href="#" onclick="changeImg()" style="float: left;margin-left:8px;">换一张</a>
    		<p id="error" class="forgot" style="float:left;color:red;position: absolute;margin-top: -20px;"></p>
			</label>
			
			<!--<p class="forgot"><a href="javascript:void(0);">忘记密码?</a></p>-->
			<div class="rem_sub">
				<div class="rem_sub_l">
					<input type="checkbox" ng-checked="isCheaked()" id="icheakbox">
					<label for="checkbox">记住</label>
				</div>
				<label>
					<input type="button" class="sub_button" name="button" id="button" ng-click="loginForm()" value="登录" style="opacity: 0.7;">
				</label>
			</div>
		</div>
	</div>
</div>

<br />
<br />
<br />
<br />
<br />
<p align="center">技术支持：山东展鸿信息科技有限公司</p>

</body>
</html>

<script type="text/javascript">
    // 刷新图片
    function changeImg() {
        var imgSrc = $("#imgObj");
        var src = imgSrc.attr("src");
        imgSrc.attr("src", changeUrl(src));
    }
    //为了使每次生成图片不一致，即不让浏览器读缓存，所以需要加上时间戳
    function changeUrl(url) {
        var timestamp = (new Date()).valueOf();
        var index = url.indexOf("?",url);
        if (index > 0) {
            url = url.substring(index, url.indexOf(url, "?"));
        }
        if ((url.indexOf("&") >= 0)) {
            url = url + "×tamp=" + timestamp;
        } else {
            url = url + "?timestamp=" + timestamp;
        }
        return url;
    }
</script>